package com.hakim.wfb.common.enums;

/**
 * 用户激活状态枚举
 * Created by Administrator on 2017/7/5.
 */
public enum UserActiveTypeEnum {

    NOTACTIVED(1, "未激活"),
    ACTIVED(2, "激活"),
    CANCELED(3, "注销");

    private int value;
    private String description;

    private UserActiveTypeEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static UserActiveTypeEnum getByValue(int value) {
        UserActiveTypeEnum[] codes = values();
        for (UserActiveTypeEnum each : codes) {
            if (each.value == value) {
                return each;
            }
        }
        return null;
    }
}

